﻿@model MobiShop.Models.Account

@{
    ViewBag.Title = "Sửa thông tin người dùng";
    Layout = "~/Views/Shared/_AdminStart.cshtml";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<div class="titleForm">
    <h3>Sửa thông tin người dùng</h3>
</div>
<div>
    <div class="boxCreateLeft"></div>
    <div class="boxtCreateCenter">
                @using (Html.BeginForm()) {
                    @Html.ValidationSummary(true)
                    <fieldset>
                        <legend></legend>
                        @Html.HiddenFor(model => model.id)
                        @Html.HiddenFor(model => model.username)
                        @Html.HiddenFor(model => model.password)
                        <table>
                            <tr>
                                <td>@Html.LabelFor(model => model.name)</td>
                                <td>@Html.EditorFor(model => model.name)
                                    @Html.ValidationMessageFor(model => model.name)</td>
                            </tr>
                            <tr>
                                <td>@Html.LabelFor(model => model.address)</td>
                                <td>@Html.TextAreaFor(model => model.address, new { @rows = "2", @cols = "30" })
                                    @Html.ValidationMessageFor(model => model.address)</td>
                            </tr>
                            <tr>
                                <td>@Html.LabelFor(model => model.birthday)</td>
                                <td>@Html.EditorFor(model => model.birthday)
                                    @Html.ValidationMessageFor(model => model.birthday)</td>
                            </tr>
                            <tr>
                                <td>@Html.LabelFor(model => model.phoneNumber)</td>
                                <td>@Html.EditorFor(model => model.phoneNumber)
                                    @Html.ValidationMessageFor(model => model.phoneNumber)</td>
                            </tr>
                            <tr>
                                <td>@Html.LabelFor(model => model.email)</td>
                                <td>@Html.EditorFor(model => model.email)
                                    @Html.ValidationMessageFor(model => model.email)</td>
                            </tr>
                            <tr>
                                <td>@Html.LabelFor(model => model.role)</td>
                                <td>@Html.EditorFor(model => model.role)
                                    @Html.ValidationMessageFor(model => model.role)</td>
                            </tr>
                            <tr>
                                <td>@Html.LabelFor(model => model.creditCardNumber)</td>
                                <td>@Html.EditorFor(model => model.creditCardNumber)
                                    @Html.ValidationMessageFor(model => model.creditCardNumber)</td>
                            </tr>
                            <tr>
                                <td>@Html.LabelFor(model => model.visible)</td>
                                <td>@Html.EditorFor(model => model.visible)
                                    @Html.ValidationMessageFor(model => model.visible)</td>
                            </tr>
                            <tr>
                                <td>@Html.LabelFor(model => model.cardType)</td>
                                <td>@Html.EditorFor(model => model.cardType)
                                    @Html.ValidationMessageFor(model => model.cardType)</td>
                            </tr>
                            <tr>
                                <td>@Html.LabelFor(model => model.cardCVV)</td>
                                <td>@Html.EditorFor(model => model.cardCVV)
                                    @Html.ValidationMessageFor(model => model.cardCVV)</td>
                            </tr>
                            <tr>
                                <td>@Html.LabelFor(model => model.cardMonthExpires)</td>
                                <td>@Html.EditorFor(model => model.cardMonthExpires)
                                    @Html.ValidationMessageFor(model => model.cardMonthExpires)</td>
                            </tr>
                            <tr>
                                <td>@Html.LabelFor(model => model.cardYearExpires)</td>
                                <td>@Html.EditorFor(model => model.cardYearExpires)
                                    @Html.ValidationMessageFor(model => model.cardYearExpires)</td>
                            </tr>
                            <tr>
                                <td></td>
                                <td>
                                    <input type="hidden" name="ReturnURL" value="@ViewBag.ReturnURL" />
                                    <input type="submit" value="Save" />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                }
    </div>
    <div class="boxCreateRight"></div>
</div>
<div class="linkCommand">
@if (ViewBag.ReturnURL == null)
{
    @Html.ActionLink("Trở về", "accountList")
}
else
{
    <a href="@ViewBag.ReturnURL">Trở về</a>
}
</div>